import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import {HttpService} from "../../../providers/HttpService";
import {NativeServiceC} from "../../../providers/NativeServiceC";

@IonicPage()
@Component({
  selector: 'page-category',
  templateUrl: 'category.html',
})
export class CategoryPage {

  private categoryUrl:string = '/cats/lv2/statistics';
  categoryList=[];
  constructor(public navCtrl: NavController,
              public navParams: NavParams,
              public httpServe:HttpService,
              public nativeService:NativeServiceC) {
  }

  ionViewDidLoad() {
    this.httpServe.get(this.categoryUrl).subscribe(res=>{
      this.categoryList = res;
      console.log(this.categoryList);
      this.nativeService.hideLoading();
    })
  }

}
